<template>
  <div id="app">
    <el-container>
      <el-header>
        <el-menu
            :default-active="$route.path"
            class="el-menu-demo"
            mode="horizontal"
            @select="handleSelect"
            background-color="#f5d9a5"
            text-color="#333"
            active-text-color="#ff6f00"
            router
        >
          <el-menu-item index="/">首页</el-menu-item>
          <el-menu-item index="/profile">用户信息</el-menu-item>
        </el-menu>
      </el-header>

      <el-container>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>

      <el-footer>
        <footer class="footer">
          <p>&copy; 2023 Your Company. All rights reserved.</p>
        </footer>
      </el-footer>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: '1'
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log('Selected menu item:', key, keyPath);
    }
  }
};
</script>

<style scoped>
.el-header {
  background-color: #f5d9a5;
  color: #333;
  line-height: 60px;
}

.el-main {
  background-color: #fffbe6;
  color: #333;
  text-align: center;
  line-height: 160px;
}

.el-footer {
  background-color: #f5d9a5;
  color: #333;
  text-align: center;
  line-height: 60px;
}

.footer {
  text-align: center;
  padding: 10px;
  background-color: #f5d9a5;
  margin-top: 20px;
}

body > .el-container {
  margin-bottom: 40px;
}
</style>